package com.ruoyi.logistic.controller;

import com.ruoyi.common.core.domain.R;
import com.ruoyi.logistic.domain.NetworkHqSettleSubject;
import com.ruoyi.logistic.service.NetworkHqSettleSubjectService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/network/HqSettleSubject")
@Api(tags = "网点财务_总部结算科目")
public class NetworkHqSettleSubjectController {
    @Autowired
    private NetworkHqSettleSubjectService networkHqSettleSubjectService;

    @ApiOperation("显示总部结算科目下拉列表")
    @GetMapping("/selectAll")
    public R selectAll() {
        List<NetworkHqSettleSubject> networkHqSettleSubjectList = networkHqSettleSubjectService.selectAll();
        if (networkHqSettleSubjectList == null || networkHqSettleSubjectList.size() == 0) {
            return R.fail("暂无数据");
        } else {
            return R.ok(networkHqSettleSubjectList);
        }
    }
}

